<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt" %>
<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>关联OKR</title>
		<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">
		<link rel="stylesheet" href="../css/mui.css">
		<link rel="stylesheet" type="text/css" href="../css/app.css" />
		<link rel="stylesheet" href="../css/icons-extra.css">
		<link rel="stylesheet" type="text/css" href="../css/public2.css" />
		<link rel="stylesheet" href="../css/iconfont.css" />
	</head>

	<body>
		<header class="mui-bar mui-bar-nav"> <a id="return_up" href="" class="mui-action-back mui-icon mui-icon-home mui-pull-left" style="line-height: 26px; font-size: 20px; color: #007aff;">
		<span style="font-size: 14px; color: #007aff;">返回</span></a>
		<h1 class="mui-title">关联OKR列表</h1>
		</header>
		
		<div class="mui-content">
		
			<div class="mui-card" style="background-color: #ccc;" id="parent_div">
				<div class="mui-card-footer">
				<p class="index-status" style='text-align:center; width:100%;margin-top:2%;margin-bottom:2%;'>关联上级OKR</p></center>   
			</div>
			</div>
			
			<div id="parent_info"></div>
		
			<div class="mui-card" style="background-color: #ccc;">
				<div class="mui-card-footer">
				<p class="index-status" style='text-align:center; width:100%;margin-top:2%;margin-bottom:2%;'>我的OKR</p></center>   
			</div>
			</div>
			
			<div id="self_info"></div>
			
			<div class="mui-card" style="background-color: #ccc;" id="child_div">
				<div class="mui-card-footer">
				<p class="index-status" style='text-align:center; width:100%;margin-top:2%;margin-bottom:2%;'>下级关联OKR</p></center>   
			</div>
			</div>
			
			<div id="child_info"></div>
			
			<div style="height:10px;">&nbsp;</div>	
			<div class="mui-content-padded"></div>  
			<div style="height:10px;">&nbsp;</div>
			<hr>
			<center><p>&copy;2016~2017 中软国际信息技术有限公司</p><center>
			<div style="height:30px;">&nbsp;</div>
			
		</div>
		
		<script src="../js/jquery-1.11.2.min.js"></script>
		<script type="text/javascript">
			var uniqueCode = '${requestScope.uniqueCode }';
			
			function splitStr(str){
				var strs = new Array(); //定义一数组 
				strs =str.split(",");
				return strs;
			}
			//O评分颜色
			function oColor(value){
				
				var color = '#4E4848';

				if (value == null) {
					return '<font></font>';
				}

				if (value == 0) {
					color = '#4E4848'; // 默认灰色
				}
				
				<c:forEach items="${sessionScope.oColor }" var="item" varStatus="status">
				
			 	var strs = splitStr("${item.LIMITSWITCH_EXPRESSION}");
			 	
				if(value >= strs[0] && value <= strs[1]){
					color = '${item.LIMITSWITCH_VALUE}';
				}
				
				</c:forEach>
				
				return '<font color="' + color + '">' + value + '</font>';
			}
			
			//状态
			function oState(value){
				
				<c:forEach items="${sessionScope.oState }" var="item" varStatus="status">
				
				if(value == "${item.CODE_NO}"){
					return '${item.CODE_NAME}';
				}
				
				</c:forEach>
				return "";
			}
			
			//OKR类别
			function oTeam(value){
				
				<c:forEach items="${sessionScope.oTeam }" var="item" varStatus="status">
				
				if(value == "${item.CODE_NO}"){
					return '${item.CODE_NAME}';
				}
				</c:forEach>
				return "";
			}
			
		</script>
		<script src="../js/comm.js?<%=System.currentTimeMillis()%>.js"></script>
		<script src="../js/mui.js"></script>
		<script src="../views-js/link.js?<%=System.currentTimeMillis()%>.js"></script>
		
	</body>

</html>